package com.jacklin.enums;

import lombok.Getter;

/**
 * 返回给前端的信息
 *
 * @Author:JackLin
 * @Create 2019/3/29 21:25
 */

@Getter
public enum ResultEnum {

    ORDER_CANCEL_SUCCESS(0, "取消订单成功"),

    PRODUCT_NOT_EXIST(1, "商品不存在"),

    PRODUCT_STOCK_ERROR(2, "库存不足"),

    ORDER_NOT_EXIST(3, "订单不存在"),

    ORDERDETAIL_NOT_EXIST(4, "订单详情不存在"),

    ORDER_STATUS_ERROR(5, "订单状态不正确"),

    ORDER_UPDATE_FAIL(6, "订单更新失败"),

    ORDER_DETAIL_EMPTY(7, "商品订单详情为空"),

    ORDER_PAY_STATUS_ERROR(8, "订单支付状态不正确"),

    PARAM_ERROR(9, "参数不正常"),

    CART_EMPTY(10, "购物车为空"),

    ORDER_OWNER_ERROR(11, "该订单不属于当前用户"),

    ORDER_FINISH_SUCCESS(12, "取消订单成功"),

    PRODUCT_STATUS_ERROR(13, "商品状态不正确"),

    WECHAT_MP_ERROR(14, "微信公众账号方面错误"),

    LOGIN_FAIL(15, "登陆失败,登陆信息不正确"),

    LOGOUT_SUCCESS(16, "登出成功"),

    WXPAY_NOTIFY_MONEY_VERIFY_ERROR(17, "微信支付异步通知金额校验不通过"),


    ;
    private Integer code;

    private String message;


    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
